const UserModel = require("../../models/user.model");
const UserSerive = {
  login: async ({ username, password }) => {
    return UserModel.findOne({
      username,
      password,
    });
  },
  upload: async (params) => {
    const { _id, ...aset } = params;
    return UserModel.updateOne({ _id }, aset);
  },
};

module.exports = UserSerive;
